package com.rytx.system.service.impl;

import com.rytx.system.domain.ysp.ArtOperationDetails;
import com.rytx.system.mapper.ArtOperationDetailsMapper;
import com.rytx.system.service.ArtOperationDetailsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class ArtOperationDetailsServiceImpl implements ArtOperationDetailsService {

    @Autowired
    private ArtOperationDetailsMapper artOperationDetailsMapper;

    @Override
    public ArtOperationDetails getById(Long id) {
        return artOperationDetailsMapper.selectByPrimaryKey(id);
    }

    @Override
    public ArtOperationDetails selectByEntity(ArtOperationDetails artOperationDetails) {
        return artOperationDetailsMapper.selectByEntity(artOperationDetails);
    }

    @Override
    public List<ArtOperationDetails> getAll() {
        return artOperationDetailsMapper.selectAll();
    }

    @Override
    public void save(ArtOperationDetails artOperationDetails) {
        artOperationDetailsMapper.insert(artOperationDetails);
    }

    @Override
    public void update(ArtOperationDetails artOperationDetails) {
        artOperationDetailsMapper.updateByPrimaryKey(artOperationDetails);
    }

    @Override
    public void delete(Long id) {
        artOperationDetailsMapper.deleteByPrimaryKey(id);
    }
}
